package com.linux.huhx.thread3.singleDesign_1;

/**
 * @Author: huhx
 * @Date: 2017-10-31 下午 4:28
 */
public class SingleDesignTest1 {
    public static void main(String[] args) {
        MyThread[] threads = new MyThread[10];
        for (int i = 0; i < 10; i++) {
            threads[i] = new MyThread();
        }
        for (int i = 0; i < 10; i++) {
            threads[i].start();
        }
    }

    static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println(MyObject8.getInstance().hashCode());
        }
    }
}